<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>執行修改統設定資料</title>
</head>
<body>
<% if(session.getAttribute("access") == "y" ){%>
<jsp:useBean id="mydb" scope="page" class="bean.ConDbBean"/> <%//連結資料庫的bean %>
<%
String id = new String(request.getParameter("id").getBytes("iso-8859-1"),"utf-8"); //防止亂碼
String value = new String(request.getParameter("value").getBytes("iso-8859-1"),"utf-8");
String desc = new String(request.getParameter("desc").getBytes("iso-8859-1"),"utf-8");

String sql="UPDATE SYS_SETTING SET S_VALUE='"+value+"',S_DESC='"+desc+"' WHERE S_ID='"+id+"'";
mydb.executeUpdate(sql);

response.sendRedirect("lookSetting.jsp"); //直接跳頁到listmember.jsp
%>
<%
  }
  else{
  	response.sendRedirect("../index.jsp"); //若沒有登入則回到index.jsp
  } 
  %>
</body>
</html>